import { http } from "@/utils/http";
import { baseUrlApi } from "./utils";
type Result = {
  data: {
    /** 列表数据 */
    list: Array<any>;
    total: number;
  };
  code: number; // 200 for success, others for error codes
  msg: string; // Response message
  success: string; // Whether the request was successful
};
/** 外呼任务列表 */
export const outbound_list = (data?: object) => {
  return http.request<Result>("post", baseUrlApi("task/taskList"), { data });
};
/** 编辑 */
export const outbound_taskEdit = (data?: object) => {
  return http.request<Result>("post", baseUrlApi("task/taskEdit"), { data });
};
/** 查编辑任务数 */
export const company_merchantConfig = (data?: object) => {
  return http.request<Result>("post", baseUrlApi("company/merchantConfig"), { data });
};
/** 席位列表 */
export const crmSeat_list = (data?: object) => {
  return http.request<Result>("post", baseUrlApi("crmSeat/agentMonitor"), { data });
};
/** 任务监控 */
export const task_monitoring = (data?: object) => {
  return http.request<Result>("post", baseUrlApi("task/taskStat"), { data });
};
/** 任务启动暂停 */
export const task_Start_Pause = (data?: object) => {
  return http.request<Result>("post", baseUrlApi("task/taskStatusUpdate"), { data });
};
/** 坐席上线 */
export const agentCallIn = (data?: object) => {
  return http.request<Result>("post", baseUrlApi("crmSeat/agentCallIn"), { data });
};
/** 新增任务 */
export const taskAdd = (data?: object) => {
  return http.request<Result>("post", baseUrlApi("task/taskAdd"), { data });
};
/** 按条件添加到群呼任务  customerData/toTask */
export const customerData_toTask= (data?: object) => {
  return http.request<Result>("post", baseUrlApi("toTask/toTask"), { data });
};
/** 添加到群呼任务进度详情   */
export const customerData_taskDetail= (data?: object) => {
  return http.request<Result>("post", baseUrlApi("toTask/taskDetail"), { data });
};
/** 任务删除   */
export const task_taskDel= (data?: object) => {
  return http.request<Result>("post", baseUrlApi("task/taskDel"), { data });
};

// ------  话单管理 --------
/** 话单标记   */
export const callOrder_orderMark= (data?: object) => {
  return http.request<Result>("post", baseUrlApi("callOrder/orderMark"), { data });
};
/** 话单列表-业务员端及队长使用   */
export const callOrder_listByStaff= (data?: object) => {
  return http.request<Result>("post", baseUrlApi("callOrder/listByStaff"), { data });
};
/** 从话单中领取客户   */
export const callOrder_toGain= (data?: object) => {
  return http.request<Result>("post", baseUrlApi("callOrder/toGain"), { data });
};
/** 加盟商话单列表-总监端使用   */
export const callOrder_listByMerchant= (data?: object) => {
  return http.request<Result>("post", baseUrlApi("callOrder/listByMerchant"), { data });
};
// ------  通话统计报表 --------
/** 依据月份获取通话日历   */
export const callReport_calendarByMonth= (data?: object) => {
  return http.request<Result>("post", baseUrlApi("callReport/calendarByMonth"), { data });
};
/** 获取当天整体群呼特征   */
export const callReport_wholeByDay= (data?: object) => {
  return http.request<Result>("post", baseUrlApi("callReport/wholeByDay"), { data });
};
/** 获取当天群呼任务特征   */
export const callReport_tasksByDay= (data?: object) => {
  return http.request<Result>("post", baseUrlApi("callReport/tasksByDay"), { data });
};
/** 获取当天群呼职员特征   */
export const callReport_staffsByDay= (data?: object) => {
  return http.request<Result>("post", baseUrlApi("callReport/staffsByDay"), { data });
};
/** 获取当天群呼时段特征   */
export const callReport_periodsByDay= (data?: object) => {
  return http.request<Result>("post", baseUrlApi("callReport/periodsByDay"), { data });
};
/** 通话排名   */
export const callReport_rank= (data?: object) => {
  return http.request<Result>("post", baseUrlApi("callReport/rank"), { data });
};
export const task_taskInfo= (data?: object) => {
  return http.request<Result>("post", baseUrlApi("task/taskInfo"), { data });
};


// ------  帮助文档 --------
export const crm_document_framework= (data?: object) => {
  return http.request<Result>("post", baseUrlApi("beginnertutorial/framework"), { data });
};
/** 文档详情 */
export const beginnertutorial_detail= (data?: object) => {
  return http.request<Result>("post", baseUrlApi("beginnertutorial/item_info "), { data });
};

/** 获取席位列表 */
export const crmuser_list= (data?: object) => {
  return http.request<Result>("post", baseUrlApi("crmSeat/list"), { data });
};



/** 分配数据 */
export const distribution_original= (data?: object) => {
  return http.request<Result>("post", baseUrlApi("distribution/original"), { data });
};

/** 员工APP点呼绩效 */
export const performance= (data?: object) => {
  return http.request<Result>("post", baseUrlApi("SingleCallReport/performance"), { data });
};
/** 员工APP点呼话单 */
export const callorder= (data?: object) => {
  return http.request<Result>("post", baseUrlApi("SingleCallReport/callorder"), { data });
};


// 废弃客户相关 -----

/** 申请列表- 总监端 */
export const listForLeader= (data?: object) => {
  return http.request<Result>("post", baseUrlApi("applyAbandon/listForLeader"), { data });
};
/** 总监端同意废弃申请  */
export const agreeByLeader= (data?: object) => {
  return http.request<Result>("post", baseUrlApi("applyAbandon/agreeByLeader"), { data });
};
/** 总监端拒绝废弃申请  */
export const refuseByLeader= (data?: object) => {
  return http.request<Result>("post", baseUrlApi("applyAbandon/refuseByLeader"), { data });
};
/** 员工端执行申请  */
export const applyByStaff= (data?: object) => {
  return http.request<Result>("post", baseUrlApi("applyAbandon/applyByStaff"), { data });
};
/** 申请列表- 业务员端  */
export const listForStaff= (data?: object) => {
  return http.request<Result>("post", baseUrlApi("applyAbandon/listForStaff"), { data });
};
/** 员工端撤销废弃申请  */
export const revokeByLeader= (data?: object) => {
  return http.request<Result>("post", baseUrlApi("applyAbandon/revokeByLeader"), { data });
};